#!/bin/sh
MYFLAGS="-O0 -g3 -Wall -Werror"
#-pedantic

if which "gcc-4.0" 2>/dev/null >/dev/null; then
  MYCC="g++-4.0";
else
  MYCC="g++";
fi

if which "gcc-4.1" 2>/dev/null >/dev/null; then
  MYCC="g++-4.1";
fi

if which "gcc-4.2" 2>/dev/null >/dev/null; then
  MYCC="g++-4.2";
fi

if which "gcc-4.3" 2>/dev/null >/dev/null; then
  MYCC="g++-4.3";
fi

if which "ccache" 2>/dev/null >/dev/null; then
  MYCC="ccache $MYCC";
fi

echo MYCC: $MYCC

#OPTS="--enable-doxygen --enable-docbook"
OPTS="$OPTS --disable-exceptions" #  --disable-rtti --enable-builtin-stl
OPTS="$OPTS --enable-debug=full"
#OPTS="$OPTS --disable-builtin-cxxtest --enable-cppunit"
#OPTS="$OPTS --disable-builtin-cxxtest --enable-boosttest"

CFLAGS="$MYFLAGS" CXXFLAGS="$MYFLAGS" CXX=$MYCC CC=$MYCC ${0%/*}/configure $OPTS --prefix=/tmp/mockpp-install
